<?php
   
    include_once '../../../../controlador/php/conexion/Conexion.php';
    $con = new Conexion();
    
    $posi = $_REQUEST['posi'];
    $oids = $_REQUEST['oid'];
    
    $consu = "select oid,hcnsolexa,asigfecha,asigfecha2,cast(asigobserv as text)as asigobserv,usu_oid,asigfechar,asighora,asirea from segasigcita where hcnsolexa = ".$oids;
    $res = $con->query($consu);
    
    while($res2 = mssql_fetch_array($res)){
        $fecha = $res2['asigfecha2'];
        $obs = utf8_encode($res2['asigobserv']);
        $r = $res2['asirea'];
        $hora = $res2['asighora'];
    }
    
    print_r(json_encode(array('fecha'=>$fecha,'hora'=>$hora,'posi'=>$posi,'obs'=>$obs,'r'=>$r)));
    
    
    $con->cerrarConexion(); 
?>